home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995 June: Reference Library / Dev.CD Jun 95 / Dev.CD Jun 95.toast / What's New? / New System Software Extensions / QuickDraw 3D ß / Programming / Interfaces / QD3DGeometry.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-04-04  |  47.2 KB  |  1,778 lines  |  [TEXT/MPS ]

  1. /******************************************************************************
  2.  **                                                                             **
  3.  **     Module:        QD3DGeometry.h                                             **
  4.  **                                                                          **
  5.  **                                                                          **
  6.  **                                                                          **
  7.  **     Purpose:     Generic geometry routines                                 **
  8.  **                                                                          **
  9.  **                                                                          **
  10.  **     Copyright (C) 1991-1995 Apple Computer, Inc. All rights reserved.     **    
  11.  **                                                                             **
  12.  **                                                                          **
  13.  *****************************************************************************/
  14. #ifndef QD3DGeometry_h
  15. #define QD3DGeometry_h
  16.  
  17. #if PRAGMA_ONCE
  18.     #pragma once
  19. #endif
  20.  
  21. #ifdef __cplusplus
  22. extern "C" {
  23. #endif    /* __cplusplus */
  24.  
  25. /******************************************************************************
  26.  **                                                                             **
  27.  **                                Geometry Routines                             **
  28.  **                                                                             **
  29.  *****************************************************************************/
  30.  
  31. EXPORT TQ3ObjectType Q3Geometry_GetType(
  32.     TQ3GeometryObject    geometry);
  33.  
  34. EXPORT TQ3Status Q3Geometry_GetAttributeSet(
  35.     TQ3GeometryObject    geometry,
  36.     TQ3AttributeSet        *attributeSet);
  37.  
  38. EXPORT TQ3Status Q3Geometry_SetAttributeSet(
  39.     TQ3GeometryObject    geometry,
  40.     TQ3AttributeSet        attributeSet);
  41.  
  42. EXPORT TQ3Status Q3Geometry_Submit(
  43.     TQ3GeometryObject    geometry, 
  44.     TQ3ViewObject        view);
  45.  
  46.  
  47. /******************************************************************************
  48.  **                                                                             **
  49.  **                            Box    Data Structure Definitions                     **
  50.  **                                                                             **
  51.  *****************************************************************************/
  52.  
  53. typedef struct TQ3BoxData {
  54.     TQ3Point3D            origin;
  55.     TQ3Vector3D            orientation;
  56.     TQ3Vector3D            majorAxis;
  57.     TQ3Vector3D            minorAxis;
  58.     TQ3AttributeSet        *faceAttributeSet;    /* Ordering : Left, right,     */
  59.                                             /*              front, back,     */
  60.                                             /*              top, bottom    */
  61.     TQ3AttributeSet        boxAttributeSet;
  62. } TQ3BoxData;
  63.  
  64.  
  65. /******************************************************************************
  66.  **                                                                             **
  67.  **                                Box Routines                                 **
  68.  **                                                                             **
  69.  *****************************************************************************/
  70.  
  71. EXPORT TQ3GeometryObject Q3Box_New(
  72.     const TQ3BoxData    *boxData);
  73.  
  74. EXPORT TQ3Status Q3Box_Submit(
  75.     const TQ3BoxData    *boxData,
  76.     TQ3ViewObject        view);
  77.     
  78. EXPORT TQ3Status Q3Box_SetData(
  79.     TQ3GeometryObject    box, 
  80.     const TQ3BoxData    *boxData);
  81.  
  82. EXPORT TQ3Status Q3Box_GetData(
  83.     TQ3GeometryObject    box,
  84.     TQ3BoxData            *boxData);
  85.  
  86. EXPORT TQ3Status Q3Box_EmptyData(
  87.     TQ3BoxData            *boxData);
  88.     
  89. EXPORT TQ3Status Q3Box_SetOrigin(
  90.     TQ3GeometryObject    box,
  91.     const TQ3Point3D    *origin);
  92.  
  93. EXPORT TQ3Status Q3Box_SetOrientation(
  94.     TQ3GeometryObject    box,
  95.     const TQ3Vector3D    *orientation);
  96.  
  97. EXPORT TQ3Status Q3Box_SetMajorAxis(
  98.     TQ3GeometryObject    box,
  99.     const TQ3Vector3D    *majorAxis);
  100.  
  101. EXPORT TQ3Status Q3Box_SetMinorAxis(
  102.     TQ3GeometryObject    box,
  103.     const TQ3Vector3D    *minorAxis);
  104.  
  105. EXPORT TQ3Status Q3Box_GetOrigin(
  106.     TQ3GeometryObject    box,
  107.     TQ3Point3D            *origin);
  108.  
  109. EXPORT TQ3Status Q3Box_GetOrientation(
  110.     TQ3GeometryObject    box,
  111.     TQ3Vector3D            *orientation);
  112.  
  113. EXPORT TQ3Status Q3Box_GetMajorAxis(
  114.     TQ3GeometryObject    box,
  115.     TQ3Vector3D            *majorAxis);
  116.  
  117. EXPORT TQ3Status Q3Box_GetMinorAxis(
  118.     TQ3GeometryObject    box,
  119.     TQ3Vector3D            *minorAxis);
  120.  
  121. EXPORT TQ3Status Q3Box_GetFaceAttributeSet(
  122.     TQ3GeometryObject    box,
  123.     unsigned long        faceIndex,
  124.     TQ3AttributeSet        *faceAttributeSet);
  125.  
  126. EXPORT TQ3Status Q3Box_SetFaceAttributeSet(
  127.     TQ3GeometryObject    box,
  128.     unsigned long        faceIndex,
  129.     TQ3AttributeSet        faceAttributeSet);
  130.  
  131.  
  132. #if defined(ESCHER_VER_15) && ESCHER_VER_15
  133.  
  134. /******************************************************************************
  135.  **                                                                             **
  136.  **                        Cone Data Structure Definitions                          **
  137.  **                                                                             **
  138.  *****************************************************************************/
  139.  
  140. typedef struct TQ3ConeData {
  141.     TQ3Point3D            origin;
  142.     TQ3Vector3D            orientation;
  143.     TQ3Vector3D            majorRadius;
  144.     TQ3Vector3D            minorRadius;
  145.     TQ3EndCap            coneCap;
  146.     TQ3AttributeSet        faceAttributeSet;
  147.     TQ3AttributeSet        bottomAttributeSet;
  148.     TQ3AttributeSet        coneAttributeSet;
  149. } TQ3ConeData;
  150.  
  151.  
  152. /******************************************************************************
  153.  **                                                                             **
  154.  **                                Cone Routines                                 **
  155.  **                                                                             **
  156.  *****************************************************************************/
  157.  
  158. EXPORT TQ3GeometryObject Q3Cone_New(
  159.     const TQ3ConeData        *coneData);
  160.  
  161. EXPORT TQ3Status Q3Cone_Submit(
  162.     const TQ3ConeData        *coneData, 
  163.     TQ3ViewObject            view);
  164.  
  165. EXPORT TQ3Status Q3Cone_SetData(
  166.     TQ3GeometryObject        cone, 
  167.     const TQ3ConeData        *coneData);
  168.  
  169. EXPORT TQ3Status Q3Cone_GetData(
  170.     TQ3GeometryObject        cone,
  171.     TQ3ConeData                *coneData);
  172.  
  173. EXPORT TQ3Status Q3Cone_SetOrigin(
  174.     TQ3GeometryObject        cone,
  175.     const TQ3Point3D        *origin);
  176.  
  177. EXPORT TQ3Status Q3Cone_SetOrientation(
  178.     TQ3GeometryObject        cone,
  179.     const TQ3Vector3D        *orientation);
  180.  
  181. EXPORT TQ3Status Q3Cone_SetMajorRadius(
  182.     TQ3GeometryObject        cone,
  183.     const TQ3Vector3D        *majorRadius);
  184.  
  185. EXPORT TQ3Status Q3Cone_SetMinorRadius(
  186.     TQ3GeometryObject        cone,
  187.     const TQ3Vector3D        *minorRadius);
  188.  
  189. EXPORT TQ3Status Q3Cone_GetOrigin(
  190.     TQ3GeometryObject        cone,
  191.     TQ3Point3D                *origin);
  192.  
  193. EXPORT TQ3Status Q3Cone_GetOrientation(
  194.     TQ3GeometryObject        cone,
  195.     TQ3Vector3D                *orientation);
  196.  
  197. EXPORT TQ3Status Q3Cone_GetMajorRadius(
  198.     TQ3GeometryObject        cone,
  199.     TQ3Vector3D                *majorRadius);
  200.  
  201. EXPORT TQ3Status Q3Cone_GetMinorRadius(
  202.     TQ3GeometryObject        cone,
  203.     TQ3Vector3D                *minorRadius);
  204.  
  205. EXPORT TQ3Status Q3Cone_SetCaps(
  206.     TQ3GeometryObject        cone,
  207.     TQ3EndCap                caps);
  208.  
  209. EXPORT TQ3Status Q3Cone_GetCaps(
  210.     TQ3GeometryObject        cone,
  211.     TQ3EndCap                *caps);
  212.  
  213. EXPORT TQ3Status Q3Cone_SetBottomAttributeSet(
  214.     TQ3GeometryObject        cone,
  215.     TQ3AttributeSet            bottomAttributeSet);
  216.  
  217. EXPORT TQ3Status Q3Cone_GetBottomAttributeSet(
  218.     TQ3GeometryObject        cone,
  219.     TQ3AttributeSet            *bottomAttributeSet);
  220.  
  221. EXPORT TQ3Status Q3Cone_SetFaceAttributeSet(
  222.     TQ3GeometryObject        cone,
  223.     TQ3AttributeSet            faceAttributeSet);
  224.  
  225. EXPORT TQ3Status Q3Cone_GetFaceAttributeSet(
  226.     TQ3GeometryObject        cone,
  227.     TQ3AttributeSet            *faceAttributeSet);
  228.  
  229. EXPORT TQ3Status Q3Cone_EmptyData(
  230.     TQ3ConeData                *coneData);
  231.  
  232.  
  233. /******************************************************************************
  234.  **                                                                             **
  235.  **                        Cylinder Data Structure Definitions                     **
  236.  **                                                                             **
  237.  *****************************************************************************/
  238.  
  239. typedef struct TQ3CylinderData {
  240.     TQ3Point3D            origin;
  241.     TQ3Vector3D            orientation;
  242.     TQ3Vector3D            majorRadius;
  243.     TQ3Vector3D            minorRadius;
  244.     TQ3EndCap             caps;
  245.     TQ3AttributeSet        topAttributeSet;
  246.     TQ3AttributeSet        faceAttributeSet;
  247.     TQ3AttributeSet        bottomAttributeSet;
  248.     TQ3AttributeSet        cylinderAttributeSet;
  249. } TQ3CylinderData;
  250.  
  251.  
  252. /******************************************************************************
  253.  **                                                                             **
  254.  **                            Cylinder Routines                                 **
  255.  **                                                                             **
  256.  *****************************************************************************/
  257.  
  258. EXPORT TQ3GeometryObject Q3Cylinder_New(
  259.     const TQ3CylinderData    *cylinderData);
  260.  
  261. EXPORT TQ3Status Q3Cylinder_Submit(
  262.     const TQ3CylinderData    *cylinderData,
  263.     TQ3ViewObject            view);
  264.     
  265. EXPORT TQ3Status Q3Cylinder_SetData(
  266.     TQ3GeometryObject        cylinder, 
  267.     const TQ3CylinderData    *cylinderData);
  268.  
  269. EXPORT TQ3Status Q3Cylinder_GetData(
  270.     TQ3GeometryObject        cylinder,
  271.     TQ3CylinderData            *cylinderData);
  272.  
  273. EXPORT TQ3Status Q3Cylinder_SetOrigin(
  274.     TQ3GeometryObject        cylinder,
  275.     const TQ3Point3D        *origin);
  276.  
  277. EXPORT TQ3Status Q3Cylinder_SetOrientation(
  278.     TQ3GeometryObject        cylinder,
  279.     const TQ3Vector3D        *orientation);
  280.  
  281. EXPORT TQ3Status Q3Cylinder_SetMajorRadius(
  282.     TQ3GeometryObject        cylinder,
  283.     const TQ3Vector3D        *majorRadius);
  284.  
  285. EXPORT TQ3Status Q3Cylinder_SetMinorRadius(
  286.     TQ3GeometryObject        cylinder,
  287.     const TQ3Vector3D        *minorRadius);
  288.  
  289. EXPORT TQ3Status Q3Cylinder_GetOrigin(
  290.     TQ3GeometryObject        cylinder,
  291.     TQ3Point3D                *origin);
  292.  
  293. EXPORT TQ3Status Q3Cylinder_GetOrientation(
  294.     TQ3GeometryObject        cylinder,
  295.     TQ3Vector3D                *orientation);
  296.  
  297. EXPORT TQ3Status Q3Cylinder_GetMajorRadius(
  298.     TQ3GeometryObject        cylinder,
  299.     TQ3Vector3D                *majorRadius);
  300.  
  301. EXPORT TQ3Status Q3Cylinder_GetMinorRadius(
  302.     TQ3GeometryObject        cylinder,
  303.     TQ3Vector3D                *minorRadius);
  304.  
  305.  
  306. EXPORT TQ3Status Q3Cylinder_SetCaps(
  307.     TQ3GeometryObject        cylinder,
  308.     TQ3EndCap                caps);
  309.  
  310. EXPORT TQ3Status Q3Cylinder_GetCaps(
  311.     TQ3GeometryObject        cylinder,
  312.     TQ3EndCap                *caps);
  313.  
  314.  
  315. EXPORT TQ3Status Q3Cylinder_SetTopAttributeSet(
  316.     TQ3GeometryObject        cylinder,
  317.     TQ3AttributeSet            topAttributeSet);
  318.  
  319. EXPORT TQ3Status Q3Cylinder_GetTopAttributeSet(
  320.     TQ3GeometryObject        cylinder,
  321.     TQ3AttributeSet            *topAttributeSet);
  322.  
  323.  
  324. EXPORT TQ3Status Q3Cylinder_SetBottomAttributeSet(
  325.     TQ3GeometryObject        cylinder,
  326.     TQ3AttributeSet            bottomAttributeSet);
  327.  
  328. EXPORT TQ3Status Q3Cylinder_GetBottomAttributeSet(
  329.     TQ3GeometryObject        cylinder,
  330.     TQ3AttributeSet            *bottomAttributeSet);
  331.  
  332.  
  333. EXPORT TQ3Status Q3Cylinder_SetFaceAttributeSet(
  334.     TQ3GeometryObject        cylinder,
  335.     TQ3AttributeSet            faceAttributeSet);
  336.  
  337. EXPORT TQ3Status Q3Cylinder_GetFaceAttributeSet(
  338.     TQ3GeometryObject        cylinder,
  339.     TQ3AttributeSet            *faceAttributeSet);
  340.  
  341. EXPORT TQ3Status Q3Cylinder_EmptyData(
  342.     TQ3CylinderData            *cylinderData);
  343.  
  344.  
  345. /******************************************************************************
  346.  **                                                                             **
  347.  **                        Disk Data Structure Definitions                         **
  348.  **                                                                             **
  349.  *****************************************************************************/
  350.  
  351. typedef struct TQ3DiskData {
  352.     TQ3Point3D            origin;
  353.     TQ3Vector3D            majorRadius;
  354.     TQ3Vector3D         minorRadius;
  355.     TQ3AttributeSet        diskAttributeSet;
  356. } TQ3DiskData;
  357.  
  358.  
  359. /******************************************************************************
  360.  **                                                                             **
  361.  **                                Disk Routines                                  **
  362.  **                                                                             **
  363.  *****************************************************************************/
  364.  
  365. EXPORT TQ3GeometryObject Q3Disk_New(
  366.     const TQ3DiskData        *diskData);
  367.  
  368. EXPORT TQ3Status Q3Disk_Submit(
  369.     const TQ3DiskData        *diskData, 
  370.     TQ3ViewObject            view);
  371.     
  372. EXPORT TQ3Status Q3Disk_SetData(
  373.     TQ3GeometryObject        disk, 
  374.     const TQ3DiskData        *diskData);
  375.  
  376. EXPORT TQ3Status Q3Disk_GetData(
  377.     TQ3GeometryObject        disk, 
  378.     TQ3DiskData                *diskData);
  379.  
  380. EXPORT TQ3Status Q3Disk_SetOrigin(
  381.     TQ3GeometryObject        disk,
  382.     const TQ3Point3D        *origin);
  383.  
  384. EXPORT TQ3Status Q3Disk_SetMajorRadius(
  385.     TQ3GeometryObject        disk,
  386.     const TQ3Vector3D        *majorRadius);
  387.  
  388. EXPORT TQ3Status Q3Disk_SetMinorRadius(
  389.     TQ3GeometryObject        disk,
  390.     const TQ3Vector3D        *minorRadius);
  391.  
  392. EXPORT TQ3Status Q3Disk_GetOrigin(
  393.     TQ3GeometryObject        disk,
  394.     TQ3Point3D                *origin);
  395.  
  396. EXPORT TQ3Status Q3Disk_GetMajorRadius(
  397.     TQ3GeometryObject        disk,
  398.     TQ3Vector3D                *majorRadius);
  399.  
  400. EXPORT TQ3Status Q3Disk_GetMinorRadius(
  401.     TQ3GeometryObject        disk,
  402.     TQ3Vector3D                *minorRadius);
  403.  
  404. EXPORT TQ3Status Q3Disk_EmptyData(
  405.     TQ3DiskData                *diskData);
  406.  
  407.  
  408. /******************************************************************************
  409.  **                                                                             **
  410.  **                            Data Structure Definitions                         **
  411.  **                                                                             **
  412.  *****************************************************************************/
  413.  
  414. typedef struct TQ3EllipseData {
  415.     TQ3Point3D            origin;
  416.     TQ3Vector3D            majorRadius;
  417.     TQ3Vector3D            minorRadius;
  418.     TQ3AttributeSet        ellipseAttributeSet;
  419. } TQ3EllipseData;
  420.  
  421.  
  422. /******************************************************************************
  423.  **                                                                             **
  424.  **                                Ellipse Routines                             **
  425.  **                                                                             **
  426.  *****************************************************************************/
  427.  
  428. EXPORT TQ3GeometryObject Q3Ellipse_New(
  429.     const TQ3EllipseData    *ellipseData);
  430.  
  431. EXPORT TQ3Status Q3Ellipse_Submit(
  432.     const TQ3EllipseData    *ellipseData,
  433.     TQ3ViewObject            view);
  434.     
  435. EXPORT TQ3Status Q3Ellipse_SetData(
  436.     TQ3GeometryObject        ellipse, 
  437.     const TQ3EllipseData    *ellipseData);
  438.  
  439. EXPORT TQ3Status Q3Ellipse_GetData(
  440.     TQ3GeometryObject        ellipse,
  441.     TQ3EllipseData            *ellipseData);
  442.  
  443. EXPORT TQ3Status Q3Ellipse_SetOrigin(
  444.     TQ3GeometryObject        ellipse,
  445.     const TQ3Point3D        *origin);
  446.  
  447. EXPORT TQ3Status Q3Ellipse_SetMajorRadius(
  448.     TQ3GeometryObject        ellipse,
  449.     const TQ3Vector3D        *majorRadius);
  450.  
  451. EXPORT TQ3Status Q3Ellipse_SetMinorRadius(
  452.     TQ3GeometryObject        ellipse,
  453.     const TQ3Vector3D        *minorRadius);
  454.  
  455. EXPORT TQ3Status Q3Ellipse_GetOrigin(
  456.     TQ3GeometryObject        ellipse,
  457.     TQ3Point3D                *origin);
  458.  
  459. EXPORT TQ3Status Q3Ellipse_GetMajorRadius(
  460.     TQ3GeometryObject        ellipse,
  461.     TQ3Vector3D                *majorRadius);
  462.  
  463. EXPORT TQ3Status Q3Ellipse_GetMinorRadius(
  464.     TQ3GeometryObject        ellipse,
  465.     TQ3Vector3D                *minorRadius);
  466.  
  467. EXPORT TQ3Status Q3Ellipse_EmptyData(
  468.     TQ3EllipseData            *ellipseData);
  469.  
  470.  
  471. /******************************************************************************
  472.  **                                                                          **
  473.  **                            Ellipsoid Data structures                         **
  474.  **                                                                          **
  475.  *****************************************************************************/
  476.  
  477. typedef struct TQ3EllipsoidData {
  478.     TQ3Point3D            origin;
  479.     TQ3Vector3D            orientation;
  480.     TQ3Vector3D            majorRadius;
  481.     TQ3Vector3D            minorRadius;
  482.     TQ3AttributeSet        ellipsoidAttributeSet;
  483. } TQ3EllipsoidData;
  484.  
  485.  
  486. /******************************************************************************
  487.  **                                                                          **
  488.  **                            Procedures                                        **
  489.  **                                                                          **
  490.  *****************************************************************************/
  491.  
  492. EXPORT TQ3GeometryObject Q3Ellipsoid_New(
  493.     const TQ3EllipsoidData    *ellipsoidData);
  494.  
  495. EXPORT TQ3Status Q3Ellipsoid_Submit(
  496.     const TQ3EllipsoidData    *ellipsoidData, 
  497.     TQ3ViewObject            view);
  498.     
  499. EXPORT TQ3Status Q3Ellipsoid_SetData(
  500.     TQ3GeometryObject        ellipsoid, 
  501.     const TQ3EllipsoidData    *ellipsoidData);
  502.  
  503. EXPORT TQ3Status Q3Ellipsoid_GetData(
  504.     TQ3GeometryObject        ellipsoid,
  505.     TQ3EllipsoidData        *ellipsoidData);
  506.  
  507. EXPORT TQ3Status Q3Ellipsoid_SetOrigin(
  508.     TQ3GeometryObject        ellipsoid,
  509.     const TQ3Point3D        *origin);
  510.  
  511. EXPORT TQ3Status Q3Ellipsoid_SetOrientation(
  512.     TQ3GeometryObject        ellipsoid,
  513.     const TQ3Vector3D        *orientation);
  514.  
  515. EXPORT TQ3Status Q3Ellipsoid_SetMajorRadius(
  516.     TQ3GeometryObject        ellipsoid,
  517.     const TQ3Vector3D        *majorRadius);
  518.  
  519. EXPORT TQ3Status Q3Ellipsoid_SetMinorRadius(
  520.     TQ3GeometryObject        ellipsoid,
  521.     const TQ3Vector3D        *minorRadius);
  522.  
  523. EXPORT TQ3Status Q3Ellipsoid_GetOrigin(
  524.     TQ3GeometryObject        ellipsoid,
  525.     TQ3Point3D                *origin);
  526.  
  527. EXPORT TQ3Status Q3Ellipsoid_GetOrientation(
  528.     TQ3GeometryObject        ellipsoid,
  529.     TQ3Vector3D                *orientation);
  530.  
  531. EXPORT TQ3Status Q3Ellipsoid_GetMajorRadius(
  532.     TQ3GeometryObject        ellipsoid,
  533.     TQ3Vector3D                *majorRadius);
  534.  
  535. EXPORT TQ3Status Q3Ellipsoid_GetMinorRadius(
  536.     TQ3GeometryObject        ellipsoid,
  537.     TQ3Vector3D                *minorRadius);
  538.  
  539. EXPORT TQ3Status Q3Ellipsoid_EmptyData(
  540.     TQ3EllipsoidData        *ellipsoidData);
  541.  
  542. #endif    /* ESCHER_VER_15 */
  543.  
  544.  
  545. /******************************************************************************
  546.  **                                                                             **
  547.  **                    General Polygon Data Structure Definitions                 **
  548.  **                                                                             **
  549.  *****************************************************************************/
  550.  
  551. typedef enum TQ3GeneralPolygonShapeHint {
  552.     kQ3GeneralPolygonShapeHintComplex,
  553.     kQ3GeneralPolygonShapeHintConcave,
  554.     kQ3GeneralPolygonShapeHintConvex
  555. } TQ3GeneralPolygonShapeHint;
  556.  
  557. typedef struct TQ3GeneralPolygonContourData {
  558.     unsigned long                    numVertices;        
  559.     TQ3Vertex3D                        *vertices;            
  560. } TQ3GeneralPolygonContourData;
  561.  
  562. typedef struct TQ3GeneralPolygonData {
  563.     unsigned long                    numContours;
  564.     TQ3GeneralPolygonContourData    *contours;
  565.     TQ3GeneralPolygonShapeHint        shapeHint;
  566.     TQ3AttributeSet                    generalPolygonAttributeSet;
  567. } TQ3GeneralPolygonData;
  568.  
  569.  
  570. /******************************************************************************
  571.  **                                                                             **
  572.  **                            General polygon Routines                         **
  573.  **                                                                             **
  574.  *****************************************************************************/
  575.  
  576. EXPORT TQ3GeometryObject Q3GeneralPolygon_New(
  577.     const TQ3GeneralPolygonData        *generalPolygonData);
  578.  
  579. EXPORT TQ3Status Q3GeneralPolygon_Submit(
  580.      const TQ3GeneralPolygonData    *generalPolygonData,
  581.      TQ3ViewObject                    view);
  582.     
  583. EXPORT TQ3Status Q3GeneralPolygon_SetData(
  584.     TQ3GeometryObject                generalPolygon, 
  585.     const TQ3GeneralPolygonData        *generalPolygonData);
  586.  
  587. EXPORT TQ3Status Q3GeneralPolygon_GetData(
  588.     TQ3GeometryObject                polygon,
  589.     TQ3GeneralPolygonData            *generalPolygonData);
  590.  
  591. EXPORT TQ3Status Q3GeneralPolygon_EmptyData(
  592.     TQ3GeneralPolygonData            *generalPolygonData);
  593.  
  594. EXPORT TQ3Status Q3GeneralPolygon_GetVertexPosition(
  595.     TQ3GeometryObject                generalPolygon,
  596.     unsigned long                    contourIndex,
  597.     unsigned long                    pointIndex,
  598.     TQ3Point3D                        *position);
  599.  
  600. EXPORT TQ3Status Q3GeneralPolygon_SetVertexPosition(
  601.     TQ3GeometryObject                generalPolygon,
  602.     unsigned long                    contourIndex,
  603.     unsigned long                    pointIndex,
  604.     const TQ3Point3D                *position);
  605.     
  606. EXPORT TQ3Status Q3GeneralPolygon_GetVertexAttributeSet(
  607.     TQ3GeometryObject                generalPolygon,
  608.     unsigned long                    contourIndex,
  609.     unsigned long                    pointIndex,
  610.     TQ3AttributeSet                    *attributeSet);
  611.  
  612. EXPORT TQ3Status Q3GeneralPolygon_SetVertexAttributeSet(
  613.     TQ3GeometryObject                generalPolygon,
  614.     unsigned long                    contourIndex,
  615.     unsigned long                    pointIndex,
  616.     TQ3AttributeSet                    attributeSet);
  617.  
  618. EXPORT TQ3Status Q3GeneralPolygon_SetShapeHint(
  619.     TQ3GeometryObject                generalPolygon,
  620.     TQ3GeneralPolygonShapeHint        shapeHint);
  621.  
  622. EXPORT TQ3Status Q3GeneralPolygon_GetShapeHint(
  623.     TQ3GeometryObject                generalPolygon,
  624.     TQ3GeneralPolygonShapeHint        *shapeHint);
  625.  
  626.  
  627. /******************************************************************************
  628.  **                                                                             **
  629.  **                        Line Data Structure Definitions                         **
  630.  **                                                                             **
  631.  *****************************************************************************/
  632.  
  633. typedef struct TQ3LineData {
  634.     TQ3Vertex3D            vertices[2];
  635.     TQ3AttributeSet        lineAttributeSet;
  636. } TQ3LineData;
  637.  
  638.  
  639. /******************************************************************************
  640.  **                                                                             **
  641.  **                            Line Routines                                     **
  642.  **                                                                             **
  643.  *****************************************************************************/
  644.  
  645. EXPORT TQ3GeometryObject Q3Line_New(
  646.     const TQ3LineData         *lineData);
  647.  
  648. EXPORT TQ3Status Q3Line_Submit(
  649.     const TQ3LineData         *lineData, 
  650.     TQ3ViewObject             view);
  651.  
  652. EXPORT TQ3Status Q3Line_GetData(
  653.     TQ3GeometryObject         line,
  654.     TQ3LineData             *lineData);
  655.     
  656. EXPORT TQ3Status Q3Line_SetData(
  657.     TQ3GeometryObject         line,
  658.     const TQ3LineData         *lineData);
  659.     
  660. EXPORT TQ3Status Q3Line_GetVertexPosition(
  661.     TQ3GeometryObject        line,
  662.     unsigned long            index,
  663.     TQ3Point3D                *position);
  664.  
  665. EXPORT TQ3Status Q3Line_SetVertexPosition(
  666.     TQ3GeometryObject        line,
  667.     unsigned long            index,
  668.     const TQ3Point3D        *position);
  669.  
  670. EXPORT TQ3Status Q3Line_GetVertexAttributeSet(
  671.     TQ3GeometryObject        line,
  672.     unsigned long            index,
  673.     TQ3AttributeSet            *attributeSet);
  674.  
  675. EXPORT TQ3Status Q3Line_SetVertexAttributeSet(
  676.     TQ3GeometryObject        line,
  677.     unsigned long            index,
  678.     TQ3AttributeSet            attributeSet);
  679.     
  680. EXPORT TQ3Status Q3Line_EmptyData(
  681.     TQ3LineData             *lineData);
  682.  
  683.  
  684. /******************************************************************************
  685.  **                                                                             **
  686.  **                        Marker Data Structure Definitions                     **
  687.  **                                                                             **
  688.  *****************************************************************************/
  689.  
  690. typedef struct TQ3MarkerData {
  691.     TQ3Point3D            location;
  692.     long                xOffset;
  693.     long                yOffset;
  694.     TQ3Bitmap            bitmap;
  695.     TQ3AttributeSet        markerAttributeSet;
  696. } TQ3MarkerData;
  697.  
  698.  
  699. /******************************************************************************
  700.  **                                                                             **
  701.  **                                Marker Routines                                 **
  702.  **                                                                             **
  703.  *****************************************************************************/
  704.  
  705. EXPORT TQ3GeometryObject Q3Marker_New(
  706.     const TQ3MarkerData        *markerData);
  707.  
  708. EXPORT TQ3Status Q3Marker_Submit(
  709.     const TQ3MarkerData        *markerData,
  710.     TQ3ViewObject            view);
  711.     
  712. EXPORT TQ3Status Q3Marker_SetData(
  713.     TQ3GeometryObject        geometry, 
  714.     const TQ3MarkerData        *markerData);
  715.  
  716. EXPORT TQ3Status Q3Marker_GetData(
  717.     TQ3GeometryObject        geometry,
  718.     TQ3MarkerData            *markerData);
  719.  
  720. EXPORT TQ3Status Q3Marker_EmptyData(
  721.     TQ3MarkerData            *markerData);
  722.     
  723. EXPORT TQ3Status Q3Marker_GetPosition(
  724.     TQ3GeometryObject        marker,
  725.     TQ3Point3D                *location);
  726.  
  727. EXPORT TQ3Status Q3Marker_SetPosition(
  728.     TQ3GeometryObject        marker,
  729.     const TQ3Point3D        *location);
  730.     
  731. EXPORT TQ3Status Q3Marker_GetXOffset(
  732.     TQ3GeometryObject        marker,
  733.     long                    *xOffset);
  734.  
  735. EXPORT TQ3Status Q3Marker_SetXOffset(
  736.     TQ3GeometryObject        marker,
  737.     long                    xOffset);
  738.  
  739. EXPORT TQ3Status Q3Marker_GetYOffset(
  740.     TQ3GeometryObject        marker,
  741.     long                    *yOffset);
  742.  
  743. EXPORT TQ3Status Q3Marker_SetYOffset(
  744.     TQ3GeometryObject        marker,
  745.     long                    yOffset);
  746.  
  747. EXPORT TQ3Status Q3Marker_GetBitmap(
  748.     TQ3GeometryObject        marker,
  749.     TQ3Bitmap                *bitmap);
  750.  
  751. EXPORT TQ3Status Q3Marker_SetBitmap(
  752.     TQ3GeometryObject        marker,
  753.     const TQ3Bitmap            *bitmap);
  754.  
  755.  
  756.  
  757. /******************************************************************************
  758.  **                                                                             **
  759.  **                        Mesh Data Structure Definitions                         **
  760.  **                                                                             **
  761.  *****************************************************************************/
  762.  
  763. typedef struct TQ3MeshComponentPrivate     *TQ3MeshComponent;
  764. typedef struct TQ3MeshVertexPrivate     *TQ3MeshVertex;
  765. typedef struct TQ3MeshVertexPrivate     *TQ3MeshFace;
  766. typedef struct TQ3MeshEdgeRepPrivate     *TQ3MeshEdge;
  767. typedef struct TQ3MeshContourPrivate    *TQ3MeshContour;
  768.  
  769.  
  770. /******************************************************************************
  771.  **                                                                             **
  772.  **                            Mesh Routines                                      **
  773.  **                                                                             **
  774.  *****************************************************************************/
  775.  
  776. /*
  777.  *  Constructors
  778.  */
  779. EXPORT TQ3GeometryObject Q3Mesh_New(
  780.     void);
  781.  
  782. EXPORT TQ3MeshVertex Q3Mesh_VertexNew(
  783.     TQ3GeometryObject    mesh,
  784.     const TQ3Vertex3D    *vertex);
  785.             
  786. EXPORT TQ3MeshFace Q3Mesh_FaceNew(
  787.     TQ3GeometryObject    mesh,
  788.     unsigned long        numVertices,
  789.     const TQ3MeshVertex    *vertices,
  790.     TQ3AttributeSet        attributeSet);
  791.  
  792. /*
  793.  *  Destructors
  794.  */
  795. EXPORT TQ3Status Q3Mesh_VertexDelete( 
  796.     TQ3GeometryObject    mesh,
  797.     TQ3MeshVertex        vertex);
  798.  
  799. EXPORT TQ3Status Q3Mesh_FaceDelete(
  800.     TQ3GeometryObject    mesh,
  801.     TQ3MeshFace            face);
  802.  
  803. /*
  804.  * Methods
  805.  */
  806. EXPORT TQ3Status Q3Mesh_DelayUpdates(
  807.     TQ3GeometryObject    mesh);
  808.  
  809. EXPORT TQ3Status Q3Mesh_ResumeUpdates(
  810.     TQ3GeometryObject    mesh);
  811.     
  812. EXPORT TQ3MeshContour Q3Mesh_FaceToContour(
  813.     TQ3GeometryObject    mesh,
  814.     TQ3MeshFace            containerFace,
  815.     TQ3MeshFace            face);
  816.     
  817. EXPORT TQ3MeshFace Q3Mesh_ContourToFace(
  818.     TQ3GeometryObject    mesh,
  819.     TQ3MeshContour        contour);
  820.  
  821. /*
  822.  * Mesh
  823.  */
  824. EXPORT TQ3Status Q3Mesh_GetNumComponents(
  825.     TQ3GeometryObject    mesh,
  826.     unsigned long        *numComponents);
  827.  
  828. EXPORT TQ3Status Q3Mesh_GetNumEdges(
  829.     TQ3GeometryObject    mesh,
  830.     unsigned long        *numEdges);
  831.  
  832. EXPORT TQ3Status Q3Mesh_GetNumVertices(
  833.     TQ3GeometryObject    mesh,
  834.     unsigned long        *numVertices);
  835.  
  836. EXPORT TQ3Status Q3Mesh_GetNumFaces(
  837.     TQ3GeometryObject    mesh,
  838.     unsigned long        *numFaces);
  839.  
  840. EXPORT TQ3Status Q3Mesh_GetNumCorners(
  841.     TQ3GeometryObject    mesh,
  842.     unsigned long        *numCorners);
  843.  
  844. EXPORT TQ3Status Q3Mesh_GetOrientable(
  845.     TQ3GeometryObject    mesh,
  846.     TQ3Boolean            *orientable);
  847.  
  848. /*
  849.  * Component
  850.  */
  851. EXPORT TQ3Status Q3Mesh_GetComponentNumVertices(
  852.     TQ3GeometryObject    mesh,
  853.     TQ3MeshComponent    component,
  854.     unsigned long        *numVertices);
  855.  
  856. EXPORT TQ3Status Q3Mesh_GetComponentNumEdges(
  857.     TQ3GeometryObject    mesh,
  858.     TQ3MeshComponent    component,
  859.     unsigned long        *numEdges);
  860.  
  861. EXPORT TQ3Status Q3Mesh_GetComponentBoundingBox(
  862.     TQ3GeometryObject    mesh,
  863.     TQ3MeshComponent    component,
  864.     TQ3BoundingBox        *boundingBox);
  865.  
  866. EXPORT TQ3Status Q3Mesh_GetComponentOrientable(
  867.     TQ3GeometryObject    mesh,
  868.     TQ3MeshComponent    component,
  869.     TQ3Boolean            *orientable);
  870.  
  871. /*
  872.  * Vertex
  873.  */
  874. EXPORT TQ3Status Q3Mesh_GetVertexCoordinates(
  875.     TQ3GeometryObject    mesh,
  876.     TQ3MeshVertex        vertex,
  877.     TQ3Point3D            *coordinates);
  878.  
  879. EXPORT TQ3Status Q3Mesh_GetVertexIndex(
  880.     TQ3GeometryObject    mesh,
  881.     TQ3MeshVertex        vertex,
  882.     unsigned long        *index);
  883.  
  884. EXPORT TQ3Status Q3Mesh_GetVertexOnBoundary(
  885.     TQ3GeometryObject    mesh,
  886.     TQ3MeshVertex        vertex,
  887.     TQ3Boolean            *onBoundary);
  888.  
  889. EXPORT TQ3Status Q3Mesh_GetVertexComponent(
  890.     TQ3GeometryObject    mesh,
  891.     TQ3MeshVertex        vertex,
  892.     TQ3MeshComponent    *component);
  893.  
  894. EXPORT TQ3Status Q3Mesh_GetVertexAttributeSet(
  895.     TQ3GeometryObject    mesh,
  896.     TQ3MeshVertex        vertex,
  897.     TQ3AttributeSet        *attributeSet);
  898.  
  899.  
  900. EXPORT TQ3Status Q3Mesh_SetVertexCoordinates(
  901.     TQ3GeometryObject    mesh,
  902.     TQ3MeshVertex        vertex,
  903.     const TQ3Point3D    *coordinates);
  904.  
  905. EXPORT TQ3Status Q3Mesh_SetVertexAttributeSet(
  906.     TQ3GeometryObject    mesh,
  907.     TQ3MeshVertex        vertex,
  908.     TQ3AttributeSet        attributeSet);
  909.  
  910.  
  911. /*
  912.  * Face
  913.  */
  914. EXPORT TQ3Status Q3Mesh_GetFaceNumVertices(
  915.     TQ3GeometryObject    mesh,
  916.     TQ3MeshFace            face,
  917.     unsigned long        *numVertices);
  918.  
  919. EXPORT TQ3Status Q3Mesh_GetFacePlaneEquation(
  920.     TQ3GeometryObject    mesh,
  921.     TQ3MeshFace            face,
  922.     TQ3PlaneEquation    *planeEquation);
  923.  
  924. EXPORT TQ3Status Q3Mesh_GetFaceNumContours(
  925.     TQ3GeometryObject    mesh,
  926.     TQ3MeshFace            face,
  927.     unsigned long        *numContours);
  928.  
  929. EXPORT TQ3Status Q3Mesh_GetFaceIndex(
  930.     TQ3GeometryObject    mesh,
  931.     TQ3MeshFace            face,
  932.     unsigned long        *index);
  933.  
  934. EXPORT TQ3Status Q3Mesh_GetFaceComponent(
  935.     TQ3GeometryObject    mesh,
  936.     TQ3MeshFace            face,
  937.     TQ3MeshComponent    *component);
  938.  
  939. EXPORT TQ3Status Q3Mesh_GetFaceAttributeSet(
  940.     TQ3GeometryObject    mesh,
  941.     TQ3MeshFace            face,
  942.     TQ3AttributeSet        *attributeSet);
  943.  
  944.  
  945. EXPORT TQ3Status Q3Mesh_SetFaceAttributeSet(
  946.     TQ3GeometryObject    mesh,
  947.     TQ3MeshFace            face,
  948.     TQ3AttributeSet        attributeSet);
  949.  
  950. /*
  951.  * Edge
  952.  */
  953. EXPORT TQ3Status Q3Mesh_GetEdgeVertices(
  954.     TQ3GeometryObject    mesh,
  955.     TQ3MeshEdge            edge,
  956.     TQ3MeshVertex        *vertex1,
  957.     TQ3MeshVertex        *vertex2);
  958.  
  959. EXPORT TQ3Status Q3Mesh_GetEdgeFaces(
  960.     TQ3GeometryObject    mesh,
  961.     TQ3MeshEdge            edge,
  962.     TQ3MeshFace            *face1,
  963.     TQ3MeshFace            *face2);
  964.  
  965. EXPORT TQ3Status Q3Mesh_GetEdgeOnBoundary(
  966.     TQ3GeometryObject    mesh,
  967.     TQ3MeshEdge            edge,
  968.     TQ3Boolean            *onBoundary);
  969.  
  970. EXPORT TQ3Status Q3Mesh_GetEdgeComponent(
  971.     TQ3GeometryObject    mesh,
  972.     TQ3MeshEdge            edge,
  973.     TQ3MeshComponent    *component);
  974.  
  975. EXPORT TQ3Status Q3Mesh_GetEdgeAttributeSet(
  976.     TQ3GeometryObject    mesh,
  977.     TQ3MeshEdge            edge,
  978.     TQ3AttributeSet        *attributeSet);
  979.     
  980.  
  981. EXPORT TQ3Status Q3Mesh_SetEdgeAttributeSet(
  982.     TQ3GeometryObject    mesh,
  983.     TQ3MeshEdge            edge,
  984.     TQ3AttributeSet        attributeSet);
  985.     
  986. /*
  987.  * Contour
  988.  */
  989. EXPORT TQ3Status Q3Mesh_GetContourFace(
  990.     TQ3GeometryObject    mesh,
  991.     TQ3MeshContour        contour,
  992.     TQ3MeshFace            *face);
  993.  
  994. EXPORT TQ3Status Q3Mesh_GetContourNumVertices(
  995.     TQ3GeometryObject    mesh,
  996.     TQ3MeshContour        contour,
  997.     unsigned long        *numVertices);
  998.  
  999. /*
  1000.  * Corner
  1001.  */
  1002. EXPORT TQ3Status Q3Mesh_GetCornerAttributeSet(
  1003.     TQ3GeometryObject    mesh,
  1004.     TQ3MeshVertex        vertex,
  1005.     TQ3MeshFace            face,
  1006.     TQ3AttributeSet        *attributeSet);
  1007.  
  1008. EXPORT TQ3Status Q3Mesh_SetCornerAttributeSet(
  1009.     TQ3GeometryObject    mesh,
  1010.     TQ3MeshVertex        vertex,
  1011.     TQ3MeshFace            face,
  1012.     TQ3AttributeSet        attributeSet);
  1013.  
  1014.  
  1015. /*
  1016.  * Public Mesh Iterators
  1017.  */
  1018. typedef struct TQ3MeshIterator {
  1019.     void                *var1;
  1020.     void                *var2;
  1021.     void                *var3;
  1022.     struct {
  1023.         void            *field1;
  1024.         char            field2[4];
  1025.     } var4;
  1026. } TQ3MeshIterator;
  1027.  
  1028. EXPORT TQ3MeshComponent Q3Mesh_FirstMeshComponent(
  1029.     TQ3GeometryObject    mesh,
  1030.     TQ3MeshIterator        *iterator);
  1031.     
  1032. EXPORT TQ3MeshComponent Q3Mesh_NextMeshComponent(
  1033.     TQ3MeshIterator        *iterator);
  1034.  
  1035. EXPORT TQ3MeshVertex Q3Mesh_FirstComponentVertex(
  1036.     TQ3MeshComponent    component,
  1037.     TQ3MeshIterator        *iterator);
  1038.     
  1039. EXPORT TQ3MeshVertex Q3Mesh_NextComponentVertex(
  1040.     TQ3MeshIterator        *iterator);
  1041.  
  1042. EXPORT TQ3MeshEdge Q3Mesh_FirstComponentEdge(
  1043.     TQ3MeshComponent    component,
  1044.     TQ3MeshIterator        *iterator);
  1045.     
  1046. EXPORT TQ3MeshEdge Q3Mesh_NextComponentEdge(
  1047.     TQ3MeshIterator        *iterator);
  1048.  
  1049. EXPORT TQ3MeshVertex Q3Mesh_FirstMeshVertex(
  1050.     TQ3GeometryObject    mesh,
  1051.     TQ3MeshIterator        *iterator);
  1052.  
  1053. EXPORT TQ3MeshVertex Q3Mesh_NextMeshVertex(
  1054.     TQ3MeshIterator        *iterator);
  1055.  
  1056. EXPORT TQ3MeshFace Q3Mesh_FirstMeshFace(
  1057.     TQ3GeometryObject    mesh,
  1058.     TQ3MeshIterator        *iterator);
  1059.  
  1060. EXPORT TQ3MeshFace Q3Mesh_NextMeshFace(
  1061.     TQ3MeshIterator        *iterator);
  1062.  
  1063. EXPORT TQ3MeshEdge Q3Mesh_FirstMeshEdge(
  1064.     TQ3GeometryObject    mesh,
  1065.     TQ3MeshIterator        *iterator);
  1066.  
  1067. EXPORT TQ3MeshEdge Q3Mesh_NextMeshEdge(
  1068.     TQ3MeshIterator        *iterator);
  1069.  
  1070. EXPORT TQ3MeshEdge Q3Mesh_FirstVertexEdge(
  1071.     TQ3MeshVertex        vertex,
  1072.     TQ3MeshIterator        *iterator);
  1073.     
  1074. EXPORT TQ3MeshEdge Q3Mesh_NextVertexEdge(
  1075.     TQ3MeshIterator        *iterator);
  1076.  
  1077. EXPORT TQ3MeshVertex Q3Mesh_FirstVertexVertex(
  1078.     TQ3MeshVertex        vertex,
  1079.     TQ3MeshIterator        *iterator);
  1080.     
  1081. EXPORT TQ3MeshVertex Q3Mesh_NextVertexVertex(
  1082.     TQ3MeshIterator        *iterator);
  1083.  
  1084. EXPORT TQ3MeshFace Q3Mesh_FirstVertexFace(
  1085.     TQ3MeshVertex        vertex,
  1086.     TQ3MeshIterator        *iterator);
  1087.     
  1088. EXPORT TQ3MeshFace Q3Mesh_NextVertexFace(
  1089.     TQ3MeshIterator        *iterator);
  1090.  
  1091. EXPORT TQ3MeshEdge Q3Mesh_FirstFaceEdge(
  1092.     TQ3MeshFace            face,
  1093.     TQ3MeshIterator        *iterator);
  1094.     
  1095. EXPORT TQ3MeshEdge Q3Mesh_NextFaceEdge(
  1096.     TQ3MeshIterator        *iterator);
  1097.  
  1098. EXPORT TQ3MeshVertex Q3Mesh_FirstFaceVertex(
  1099.     TQ3MeshFace            face,
  1100.     TQ3MeshIterator        *iterator);
  1101.     
  1102. EXPORT TQ3MeshVertex Q3Mesh_NextFaceVertex(
  1103.     TQ3MeshIterator        *iterator);
  1104.  
  1105. EXPORT TQ3MeshFace Q3Mesh_FirstFaceFace(
  1106.     TQ3MeshFace            face,
  1107.     TQ3MeshIterator        *iterator);
  1108.     
  1109. EXPORT TQ3MeshFace Q3Mesh_NextFaceFace(
  1110.     TQ3MeshIterator        *iterator);
  1111.  
  1112. EXPORT TQ3MeshContour Q3Mesh_FirstFaceContour(
  1113.     TQ3MeshFace            face,
  1114.     TQ3MeshIterator        *iterator);
  1115.  
  1116. EXPORT TQ3MeshContour Q3Mesh_NextFaceContour(
  1117.     TQ3MeshIterator        *iterator);
  1118.  
  1119. EXPORT TQ3MeshEdge Q3Mesh_FirstContourEdge(
  1120.     TQ3MeshContour        contour,
  1121.     TQ3MeshIterator        *iterator);
  1122.     
  1123. EXPORT TQ3MeshEdge Q3Mesh_NextContourEdge(
  1124.     TQ3MeshIterator        *iterator);
  1125.  
  1126. EXPORT TQ3MeshVertex Q3Mesh_FirstContourVertex(
  1127.     TQ3MeshContour        contour,
  1128.     TQ3MeshIterator        *iterator);
  1129.     
  1130. EXPORT TQ3MeshVertex Q3Mesh_NextContourVertex(
  1131.     TQ3MeshIterator        *iterator);
  1132.  
  1133. EXPORT TQ3MeshFace Q3Mesh_FirstContourFace(
  1134.     TQ3MeshContour        contour,
  1135.     TQ3MeshIterator        *iterator);
  1136.     
  1137. EXPORT TQ3MeshFace Q3Mesh_NextContourFace(
  1138.     TQ3MeshIterator        *iterator);
  1139.  
  1140. #define    Q3ForEachMeshComponent(m,c,i)                                        \
  1141.     for ( (c) = Q3Mesh_FirstMeshComponent((m),(i));                            \
  1142.           (c);                                                                \
  1143.           (c) = Q3Mesh_NextMeshComponent((i)) )
  1144.  
  1145. #define Q3ForEachComponentVertex(c,v,i)                                        \
  1146.     for ( (v) = Q3Mesh_FirstComponentVertex((c),(i));                        \
  1147.           (v);                                                                \
  1148.           (v) = Q3Mesh_NextComponentVertex((i)) )
  1149.           
  1150. #define Q3ForEachComponentEdge(c,e,i)                                        \
  1151.     for ( (e) = Q3Mesh_FirstComponentEdge((c),(i));                            \
  1152.           (e);                                                                \
  1153.           (e) = Q3Mesh_NextComponentEdge((i)) )
  1154.  
  1155. #define Q3ForEachMeshVertex(m,v,i)                                            \
  1156.     for ( (v) = Q3Mesh_FirstMeshVertex((m),(i));                            \
  1157.           (v);                                                                \
  1158.           (v) = Q3Mesh_NextMeshVertex((i)) )
  1159.  
  1160. #define Q3ForEachMeshFace(m,f,i)                                            \
  1161.     for ( (f) = Q3Mesh_FirstMeshFace((m),(i));                                \
  1162.           (f);                                                                \
  1163.           (f) = Q3Mesh_NextMeshFace((i)) )
  1164.  
  1165. #define Q3ForEachMeshEdge(m,e,i)                                            \
  1166.     for ( (e) = Q3Mesh_FirstMeshEdge((m),(i));                                \
  1167.           (e);                                                                \
  1168.           (e) = Q3Mesh_NextMeshEdge((i)) )
  1169.  
  1170. #define Q3ForEachVertexEdge(v,e,i)                                            \
  1171.     for ( (e) = Q3Mesh_FirstVertexEdge((v),(i));                            \
  1172.           (e);                                                                \
  1173.           (e) = Q3Mesh_NextVertexEdge((i)) )
  1174.  
  1175. #define Q3ForEachVertexVertex(v,n,i)                                        \
  1176.     for ( (n) = Q3Mesh_FirstVertexVertex((v),(i));                            \
  1177.           (n);                                                                \
  1178.           (n) = Q3Mesh_NextVertexVertex((i)) )
  1179.  
  1180. #define Q3ForEachVertexFace(v,f,i)                                            \
  1181.     for ( (f) = Q3Mesh_FirstVertexFace((v),(i));                            \
  1182.           (f);                                                                \
  1183.           (f) = Q3Mesh_NextVertexFace((i)) )
  1184.  
  1185. #define Q3ForEachFaceEdge(f,e,i)                                            \
  1186.     for ( (e) = Q3Mesh_FirstFaceEdge((f),(i));                                \
  1187.           (e);                                                                \
  1188.           (e) = Q3Mesh_NextFaceEdge((i)) )
  1189.  
  1190. #define Q3ForEachFaceVertex(f,v,i)                                            \
  1191.     for ( (v) = Q3Mesh_FirstFaceVertex((f),(i));                            \
  1192.           (v);                                                                \
  1193.           (v) = Q3Mesh_NextFaceVertex((i)) )
  1194.     
  1195. #define Q3ForEachFaceFace(f,n,i)                                            \
  1196.     for ( (n) = Q3Mesh_FirstFaceFace((f),(i));                              \
  1197.           (n);                                                                \
  1198.           (n) = Q3Mesh_NextFaceFace((i)) )
  1199.           
  1200. #define Q3ForEachFaceContour(f,h,i)                                            \
  1201.     for ( (h) = Q3Mesh_FirstFaceContour((f),(i));                            \
  1202.           (h);                                                                \
  1203.           (h) = Q3Mesh_NextFaceContour((i)) )
  1204.  
  1205. #define Q3ForEachContourEdge(h,e,i)                                            \
  1206.     for ( (e) = Q3Mesh_FirstContourEdge((h),(i));                            \
  1207.           (e);                                                                \
  1208.           (e) = Q3Mesh_NextContourEdge((i)) )
  1209.  
  1210. #define Q3ForEachContourVertex(h,v,i)                                        \
  1211.     for ( (v) = Q3Mesh_FirstContourVertex((h),(i));                            \
  1212.           (v);                                                                \
  1213.           (v) = Q3Mesh_NextContourVertex((i)) )
  1214.  
  1215. #define Q3ForEachContourFace(h,f,i)                                            \
  1216.     for ( (f) = Q3Mesh_FirstContourFace((h),(i));                            \
  1217.           (f);                                                                \
  1218.           (f) = Q3Mesh_NextContourFace((i)) )
  1219.  
  1220.  
  1221. /******************************************************************************
  1222.  **                                                                             **
  1223.  **                            Maximum order for NURB Curves                     **
  1224.  **                                                                             **
  1225.  *****************************************************************************/
  1226.  
  1227. #define kQ3NURBCurveMaxOrder    16
  1228.  
  1229.  
  1230. /******************************************************************************
  1231.  **                                                                             **
  1232.  **                            Data Structure Definitions                         **
  1233.  **                                                                             **
  1234.  *****************************************************************************/
  1235.  
  1236. typedef struct TQ3NURBCurveData {
  1237.      unsigned long            order;
  1238.      unsigned long            numPoints;
  1239.      TQ3RationalPoint4D        *controlPoints;
  1240.      float                    *knots;
  1241.      TQ3AttributeSet            curveAttributeSet;
  1242. } TQ3NURBCurveData;
  1243.  
  1244.  
  1245. /******************************************************************************
  1246.  **                                                                             **
  1247.  **                                NURB Curve Routines                             **
  1248.  **                                                                             **
  1249.  *****************************************************************************/
  1250.  
  1251. EXPORT TQ3GeometryObject Q3NURBCurve_New(
  1252.     const TQ3NURBCurveData        *curveData);
  1253.  
  1254. EXPORT TQ3Status Q3NURBCurve_Submit(
  1255.     const TQ3NURBCurveData        *curveData,
  1256.     TQ3ViewObject                view);
  1257.  
  1258. EXPORT TQ3Status Q3NURBCurve_SetData(
  1259.     TQ3GeometryObject            curve, 
  1260.     const TQ3NURBCurveData        *nurbCurveData);
  1261.  
  1262. EXPORT TQ3Status Q3NURBCurve_GetData(
  1263.     TQ3GeometryObject            curve,
  1264.     TQ3NURBCurveData            *nurbCurveData); 
  1265.  
  1266. EXPORT TQ3Status Q3NURBCurve_EmptyData(
  1267.     TQ3NURBCurveData            *nurbCurveData);
  1268.  
  1269. EXPORT TQ3Status Q3NURBCurve_SetControlPoint(
  1270.     TQ3GeometryObject            curve,
  1271.     unsigned long                pointIndex,
  1272.     const TQ3RationalPoint4D    *point4D);
  1273.     
  1274. EXPORT TQ3Status Q3NURBCurve_GetControlPoint(
  1275.     TQ3GeometryObject            curve,
  1276.     unsigned long                pointIndex,
  1277.     TQ3RationalPoint4D            *point4D);
  1278.  
  1279. EXPORT TQ3Status Q3NURBCurve_SetKnot(
  1280.     TQ3GeometryObject            curve,
  1281.     unsigned long                knotIndex,
  1282.     float                        knotValue);
  1283.  
  1284. EXPORT TQ3Status Q3NURBCurve_GetKnot(
  1285.     TQ3GeometryObject            curve,
  1286.     unsigned long                knotIndex,
  1287.     float                        *knotValue);
  1288.  
  1289.  
  1290. /******************************************************************************
  1291.  **                                                                             **
  1292.  **                            Maximum NURB Patch Order                         **
  1293.  **                                                                             **
  1294.  *****************************************************************************/
  1295.  
  1296. #define    kQ3NURBPatchMaxOrder    11
  1297.  
  1298. /******************************************************************************
  1299.  **                                                                             **
  1300.  **                        NURB Patch Data Structure Definitions                 **
  1301.  **                                                                             **
  1302.  *****************************************************************************/
  1303.  
  1304. typedef struct TQ3NURBPatchTrimCurveData {
  1305.      unsigned long                    order;
  1306.      unsigned long                    numPoints;
  1307.      TQ3RationalPoint3D                *controlPoints;    
  1308.     float                            *knots;    
  1309. } TQ3NURBPatchTrimCurveData;
  1310.  
  1311. typedef struct TQ3NURBPatchTrimLoopData {
  1312.     unsigned long                    numTrimCurves;
  1313.     TQ3NURBPatchTrimCurveData        *trimCurves;
  1314. } TQ3NURBPatchTrimLoopData;
  1315.  
  1316. typedef struct TQ3NURBPatchData {
  1317.     unsigned long                        uOrder;
  1318.     unsigned long                    vOrder;
  1319.     unsigned long                    numRows;
  1320.     unsigned long                        numColumns;                                  
  1321.     TQ3RationalPoint4D                *controlPoints;
  1322.     float                            *uKnots; 
  1323.     float                            *vKnots;
  1324.     unsigned long                    numTrimLoops;
  1325.     TQ3NURBPatchTrimLoopData        *trimLoops;
  1326.     TQ3AttributeSet                    patchAttributeSet;
  1327. } TQ3NURBPatchData;
  1328.  
  1329.  
  1330. /******************************************************************************
  1331.  **                                                                             **
  1332.  **                                NURB Patch Routines                             **
  1333.  **                                                                             **
  1334.  *****************************************************************************/
  1335.  
  1336. EXPORT TQ3GeometryObject Q3NURBPatch_New(
  1337.     const TQ3NURBPatchData        *nurbPatchData);
  1338.  
  1339. EXPORT TQ3Status Q3NURBPatch_Submit(
  1340.     const TQ3NURBPatchData        *nurbPatchData,
  1341.     TQ3ViewObject                view);
  1342.  
  1343. EXPORT TQ3Status Q3NURBPatch_SetData(
  1344.     TQ3GeometryObject            nurbPatch, 
  1345.     const TQ3NURBPatchData        *nurbPatchData);
  1346.  
  1347. EXPORT TQ3Status Q3NURBPatch_GetData(
  1348.     TQ3GeometryObject            nurbPatch, 
  1349.     TQ3NURBPatchData            *nurbPatchData);
  1350.  
  1351. EXPORT TQ3Status Q3NURBPatch_SetControlPoint(
  1352.     TQ3GeometryObject            nurbPatch,
  1353.     unsigned long                rowIndex,
  1354.     unsigned long                columnIndex,
  1355.     const TQ3RationalPoint4D    *point4D);
  1356.  
  1357. EXPORT TQ3Status Q3NURBPatch_GetControlPoint(
  1358.     TQ3GeometryObject            nurbPatch,
  1359.     unsigned long                rowIndex,
  1360.     unsigned long                columnIndex,
  1361.     TQ3RationalPoint4D            *point4D);
  1362.  
  1363. EXPORT TQ3Status Q3NURBPatch_SetUKnot(
  1364.     TQ3GeometryObject            nurbPatch,
  1365.     unsigned long                knotIndex,
  1366.     float                        knotValue);
  1367.  
  1368. EXPORT TQ3Status Q3NURBPatch_SetVKnot(
  1369.     TQ3GeometryObject            nurbPatch,
  1370.     unsigned long                knotIndex,
  1371.     float                        knotValue);
  1372.     
  1373. EXPORT TQ3Status Q3NURBPatch_GetUKnot(
  1374.     TQ3GeometryObject            nurbPatch,
  1375.     unsigned long                knotIndex,
  1376.     float                        *knotValue);
  1377.  
  1378. EXPORT TQ3Status Q3NURBPatch_GetVKnot(
  1379.     TQ3GeometryObject            nurbPatch,
  1380.     unsigned long                knotIndex,
  1381.     float                        *knotValue);
  1382.  
  1383. EXPORT TQ3Status Q3NURBPatch_EmptyData(
  1384.     TQ3NURBPatchData            *nurbPatchData);
  1385.  
  1386.  
  1387. /******************************************************************************
  1388.  **                                                                             **
  1389.  **                        Point Data Structure Definitions                     **
  1390.  **                                                                             **
  1391.  *****************************************************************************/
  1392.  
  1393. typedef struct TQ3PointData {
  1394.     TQ3Point3D            point;
  1395.     TQ3AttributeSet        pointAttributeSet;
  1396. } TQ3PointData;
  1397.  
  1398.  
  1399. /******************************************************************************
  1400.  **                                                                             **
  1401.  **                                Point Routines                                 **
  1402.  **                                                                             **
  1403.  *****************************************************************************/
  1404.     
  1405. EXPORT TQ3GeometryObject Q3Point_New(
  1406.     const TQ3PointData         *pointData);
  1407.  
  1408. EXPORT TQ3Status Q3Point_Submit(
  1409.     const TQ3PointData         *pointData,
  1410.     TQ3ViewObject             view);
  1411.     
  1412. EXPORT TQ3Status Q3Point_GetData(
  1413.     TQ3GeometryObject         point,
  1414.     TQ3PointData            *pointData);
  1415.     
  1416. EXPORT TQ3Status Q3Point_SetData(
  1417.     TQ3GeometryObject         point,
  1418.     const TQ3PointData         *pointData);
  1419.     
  1420. EXPORT TQ3Status Q3Point_EmptyData(
  1421.     TQ3PointData             *pointData);    
  1422.     
  1423. EXPORT TQ3Status Q3Point_SetPosition(
  1424.     TQ3GeometryObject        point,
  1425.     const TQ3Point3D        *position);
  1426.     
  1427. EXPORT TQ3Status Q3Point_GetPosition(
  1428.     TQ3GeometryObject        point,
  1429.     TQ3Point3D                *position);
  1430.  
  1431.  
  1432. /******************************************************************************
  1433.  **                                                                             **
  1434.  **                        Polygon Data Structure Definitions                     **
  1435.  **                                                                             **
  1436.  *****************************************************************************/
  1437.  
  1438. typedef struct TQ3PolygonData {
  1439.     unsigned long        numVertices;        
  1440.     TQ3Vertex3D            *vertices;            
  1441.     TQ3AttributeSet        polygonAttributeSet;
  1442. } TQ3PolygonData;
  1443.  
  1444.  
  1445. /******************************************************************************
  1446.  **                                                                             **
  1447.  **                            Polygon Routines                                 **
  1448.  **                                                                             **
  1449.  *****************************************************************************/
  1450.  
  1451. EXPORT TQ3GeometryObject Q3Polygon_New(
  1452.     const TQ3PolygonData    *polygonData);
  1453.  
  1454. EXPORT TQ3Status Q3Polygon_Submit(
  1455.     const TQ3PolygonData    *polygonData,
  1456.     TQ3ViewObject            view);
  1457.     
  1458. EXPORT TQ3Status Q3Polygon_SetData(
  1459.     TQ3GeometryObject        polygon, 
  1460.     const TQ3PolygonData    *polygonData);
  1461.  
  1462. EXPORT TQ3Status Q3Polygon_GetData(
  1463.     TQ3GeometryObject        polygon,
  1464.     TQ3PolygonData            *polygonData);
  1465.  
  1466. EXPORT TQ3Status Q3Polygon_EmptyData(
  1467.     TQ3PolygonData            *polygonData);
  1468.  
  1469. EXPORT TQ3Status Q3Polygon_GetVertexPosition(
  1470.     TQ3GeometryObject        polygon,
  1471.     unsigned long            index,
  1472.     TQ3Point3D                *point);
  1473.  
  1474. EXPORT TQ3Status Q3Polygon_SetVertexPosition(
  1475.     TQ3GeometryObject        polygon,
  1476.     unsigned long            index,
  1477.     const TQ3Point3D        *point);
  1478.  
  1479. EXPORT TQ3Status Q3Polygon_GetVertexAttributeSet(
  1480.     TQ3GeometryObject        polygon,
  1481.     unsigned long            index,
  1482.     TQ3AttributeSet            *attributeSet);
  1483.  
  1484. EXPORT TQ3Status Q3Polygon_SetVertexAttributeSet(
  1485.     TQ3GeometryObject        polygon,
  1486.     unsigned long            index,
  1487.     TQ3AttributeSet            attributeSet);
  1488.  
  1489.  
  1490. /******************************************************************************
  1491.  **                                                                             **
  1492.  **                        PolyLine Data Structure Definitions                     **
  1493.  **                                                                             **
  1494.  *****************************************************************************/
  1495.  
  1496. typedef struct TQ3PolyLineData {
  1497.     unsigned long       numVertices;            
  1498.     TQ3Vertex3D            *vertices;                
  1499.     TQ3AttributeSet        *segmentAttributeSet;        
  1500.     TQ3AttributeSet        polyLineAttributeSet;        
  1501. } TQ3PolyLineData;
  1502.     
  1503.  
  1504. /******************************************************************************
  1505.  **                                                                             **
  1506.  **                            PolyLine Routines                                 **
  1507.  **                                                                             **
  1508.  *****************************************************************************/
  1509.  
  1510. EXPORT TQ3GeometryObject Q3PolyLine_New(
  1511.     const TQ3PolyLineData    *polylineData);
  1512.  
  1513. EXPORT TQ3Status Q3PolyLine_Submit(
  1514.     const TQ3PolyLineData    *polyLineData,
  1515.     TQ3ViewObject            view);
  1516.     
  1517. EXPORT TQ3Status Q3PolyLine_SetData(
  1518.     TQ3GeometryObject        polyLine, 
  1519.     const TQ3PolyLineData    *polyLineData);
  1520.  
  1521. EXPORT TQ3Status Q3PolyLine_GetData(
  1522.     TQ3GeometryObject        polyLine,
  1523.     TQ3PolyLineData            *polyLineData);
  1524.  
  1525. EXPORT TQ3Status Q3PolyLine_EmptyData(
  1526.     TQ3PolyLineData            *polyLineData);
  1527.         
  1528. EXPORT TQ3Status Q3PolyLine_GetVertexPosition(
  1529.     TQ3GeometryObject        polyLine,
  1530.     unsigned long            index,
  1531.     TQ3Point3D                *position);
  1532.  
  1533. EXPORT TQ3Status Q3PolyLine_SetVertexPosition(
  1534.     TQ3GeometryObject        polyLine,
  1535.     unsigned long            index,
  1536.     const TQ3Point3D        *position);
  1537.  
  1538. EXPORT TQ3Status Q3PolyLine_GetVertexAttributeSet(
  1539.     TQ3GeometryObject        polyLine,
  1540.     unsigned long            index,
  1541.     TQ3AttributeSet            *attributeSet);
  1542.  
  1543. EXPORT TQ3Status Q3PolyLine_SetVertexAttributeSet(
  1544.     TQ3GeometryObject        polyLine,
  1545.     unsigned long            index,
  1546.     TQ3AttributeSet            attributeSet);
  1547.  
  1548. EXPORT TQ3Status Q3PolyLine_GetSegmentAttributeSet(
  1549.     TQ3GeometryObject        polyLine,
  1550.     unsigned long            index,
  1551.     TQ3AttributeSet            *attributeSet);
  1552.  
  1553. EXPORT TQ3Status Q3PolyLine_SetSegmentAttributeSet(
  1554.     TQ3GeometryObject        polyLine,
  1555.     unsigned long            index,
  1556.     TQ3AttributeSet            attributeSet);
  1557.  
  1558.  
  1559. #if defined(ESCHER_VER_15) && ESCHER_VER_15
  1560. /******************************************************************************
  1561.  **                                                                             **
  1562.  **                        Torus Data Structure Definitions                     **
  1563.  **                                                                             **
  1564.  *****************************************************************************/
  1565.     
  1566. typedef struct TQ3TorusData {
  1567.     TQ3Point3D            origin;
  1568.     TQ3Vector3D            orientation;
  1569.     TQ3Vector3D            majorRadius;
  1570.     TQ3Vector3D            minorRadius;
  1571.     float                ratio;
  1572.     TQ3AttributeSet        torusAttributeSet;
  1573. } TQ3TorusData;
  1574.  
  1575.  
  1576. /******************************************************************************
  1577.  **                                                                             **
  1578.  **                                Torus Routines                                 **
  1579.  **                                                                             **
  1580.  *****************************************************************************/
  1581.  
  1582. EXPORT TQ3GeometryObject Q3Torus_New(
  1583.     const TQ3TorusData        *torusData);
  1584.  
  1585. EXPORT TQ3Status Q3Torus_Submit(
  1586.     const TQ3TorusData        *torusData, 
  1587.     TQ3ViewObject            view);
  1588.     
  1589. EXPORT TQ3Status Q3Torus_SetData(
  1590.     TQ3GeometryObject        torus, 
  1591.     const TQ3TorusData        *torusData);
  1592.  
  1593. EXPORT TQ3Status Q3Torus_GetData(
  1594.     TQ3GeometryObject        torus, 
  1595.     TQ3TorusData            *torusData);
  1596.  
  1597. EXPORT TQ3Status Q3Torus_SetOrigin(
  1598.     TQ3GeometryObject        torus,
  1599.     const TQ3Point3D        *origin);
  1600.  
  1601. EXPORT TQ3Status Q3Torus_SetOrientation(
  1602.     TQ3GeometryObject        torus,
  1603.     const TQ3Vector3D        *orientation);
  1604.  
  1605. EXPORT TQ3Status Q3Torus_SetMajorRadius(
  1606.     TQ3GeometryObject        torus,
  1607.     const TQ3Vector3D        *majorRadius);
  1608.  
  1609. EXPORT TQ3Status Q3Torus_SetMinorRadius(
  1610.     TQ3GeometryObject        torus,
  1611.     const TQ3Vector3D        *minorRadius);
  1612.  
  1613. EXPORT TQ3Status Q3Torus_SetRatio(
  1614.     TQ3GeometryObject        torus,
  1615.     float                    ratio);
  1616.  
  1617. EXPORT TQ3Status Q3Torus_GetOrigin(
  1618.     TQ3GeometryObject        torus,
  1619.     TQ3Point3D                *origin);
  1620.  
  1621. EXPORT TQ3Status Q3Torus_GetOrientation(
  1622.     TQ3GeometryObject        torus,
  1623.     TQ3Vector3D                *orientation);
  1624.  
  1625. EXPORT TQ3Status Q3Torus_GetMajorRadius(
  1626.     TQ3GeometryObject        torus,
  1627.     TQ3Vector3D                *majorRadius);
  1628.  
  1629. EXPORT TQ3Status Q3Torus_GetMinorRadius(
  1630.     TQ3GeometryObject        torus,
  1631.     TQ3Vector3D                *minorRadius);
  1632.  
  1633. EXPORT TQ3Status Q3Torus_GetRatio(
  1634.     TQ3GeometryObject        torus,
  1635.      float                    *ratio);
  1636.      
  1637. EXPORT TQ3Status Q3Torus_EmptyData(
  1638.     TQ3TorusData            *torusData);
  1639.  
  1640. #endif  /*  ESCHER_VER_15  */
  1641.  
  1642.  
  1643. /******************************************************************************
  1644.  **                                                                             **
  1645.  **                        Triangle Data Structure Definitions                     **
  1646.  **                                                                             **
  1647.  *****************************************************************************/
  1648.  
  1649. typedef struct TQ3TriangleData {
  1650.     TQ3Vertex3D            vertices[3];
  1651.     TQ3AttributeSet        triangleAttributeSet;
  1652. } TQ3TriangleData;
  1653.  
  1654.  
  1655. /******************************************************************************
  1656.  **                                                                             **
  1657.  **                            Triangle Routines                                 **
  1658.  **                                                                             **
  1659.  *****************************************************************************/
  1660.  
  1661. EXPORT TQ3GeometryObject Q3Triangle_New(
  1662.     const TQ3TriangleData    *triangleData);
  1663.  
  1664. EXPORT TQ3Status Q3Triangle_Submit(
  1665.     const TQ3TriangleData    *triangleData,
  1666.     TQ3ViewObject            view);
  1667.     
  1668. EXPORT TQ3Status Q3Triangle_SetData(
  1669.     TQ3GeometryObject        triangle, 
  1670.     const TQ3TriangleData    *triangleData);
  1671.  
  1672. EXPORT TQ3Status Q3Triangle_GetData(
  1673.     TQ3GeometryObject        triangle,
  1674.     TQ3TriangleData            *triangleData);
  1675.  
  1676. EXPORT TQ3Status Q3Triangle_EmptyData(
  1677.     TQ3TriangleData            *triangleData);
  1678.  
  1679. EXPORT TQ3Status Q3Triangle_GetVertexPosition(
  1680.     TQ3GeometryObject        triangle,
  1681.     unsigned long            index,
  1682.     TQ3Point3D                *point);
  1683.  
  1684. EXPORT TQ3Status Q3Triangle_SetVertexPosition(
  1685.     TQ3GeometryObject        triangle,
  1686.     unsigned long            index,
  1687.     const TQ3Point3D        *point);
  1688.  
  1689. EXPORT TQ3Status Q3Triangle_GetVertexAttributeSet(
  1690.     TQ3GeometryObject        triangle,
  1691.     unsigned long            index,
  1692.     TQ3AttributeSet            *attributeSet);
  1693.  
  1694. EXPORT TQ3Status Q3Triangle_SetVertexAttributeSet(
  1695.     TQ3GeometryObject        triangle,
  1696.     unsigned long             index,
  1697.     TQ3AttributeSet             attributeSet);
  1698.  
  1699.  
  1700. /******************************************************************************
  1701.  **                                                                             **
  1702.  **                        TriGrid Data Structure Definitions                     **
  1703.  **                                                                             **
  1704.  *****************************************************************************/
  1705.  
  1706. typedef struct TQ3TriGridData {
  1707.     unsigned long        numRows;            
  1708.     unsigned long        numColumns;
  1709.     TQ3Vertex3D            *vertices;            
  1710.     TQ3AttributeSet        *facetAttributeSet;
  1711.     TQ3AttributeSet        triGridAttributeSet;
  1712. } TQ3TriGridData;
  1713.  
  1714.  
  1715. /******************************************************************************
  1716.  **                                                                             **
  1717.  **                                TriGrid Routines                             **
  1718.  **                                                                             **
  1719.  *****************************************************************************/
  1720.  
  1721. EXPORT TQ3GeometryObject Q3TriGrid_New(
  1722.     const TQ3TriGridData    *triGridData);
  1723.  
  1724. EXPORT TQ3Status Q3TriGrid_Submit(
  1725.     const TQ3TriGridData    *triGridData,
  1726.     TQ3ViewObject            view);
  1727.     
  1728. EXPORT TQ3Status Q3TriGrid_SetData(
  1729.     TQ3GeometryObject        triGrid, 
  1730.     const TQ3TriGridData    *triGridData);
  1731.  
  1732. EXPORT TQ3Status Q3TriGrid_GetData(
  1733.     TQ3GeometryObject        triGrid,
  1734.     TQ3TriGridData            *triGridData);
  1735.  
  1736. EXPORT TQ3Status Q3TriGrid_EmptyData(
  1737.     TQ3TriGridData            *triGridData);
  1738.  
  1739. EXPORT TQ3Status Q3TriGrid_GetVertexPosition(
  1740.     TQ3GeometryObject        triGrid,
  1741.     unsigned long            rowIndex,
  1742.     unsigned long            columnIndex,
  1743.     TQ3Point3D                *position);
  1744.  
  1745. EXPORT TQ3Status Q3TriGrid_SetVertexPosition(
  1746.     TQ3GeometryObject        triGrid,
  1747.     unsigned long            rowIndex,
  1748.     unsigned long            columnIndex,
  1749.     const TQ3Point3D        *position);
  1750.  
  1751. EXPORT TQ3Status Q3TriGrid_GetVertexAttributeSet(
  1752.     TQ3GeometryObject        triGrid,
  1753.     unsigned long            rowIndex,
  1754.     unsigned long            columnIndex,
  1755.     TQ3AttributeSet            *attributeSet);
  1756.  
  1757. EXPORT TQ3Status Q3TriGrid_SetVertexAttributeSet(
  1758.     TQ3GeometryObject        triGrid,
  1759.     unsigned long            rowIndex,
  1760.     unsigned long            columnIndex,
  1761.     TQ3AttributeSet            attributeSet);
  1762.  
  1763. EXPORT TQ3Status Q3TriGrid_GetFacetAttributeSet(
  1764.     TQ3GeometryObject        triGrid,
  1765.     unsigned long            faceIndex,
  1766.     TQ3AttributeSet            *facetAttributeSet);
  1767.  
  1768. EXPORT TQ3Status Q3TriGrid_SetFacetAttributeSet(
  1769.     TQ3GeometryObject        triGrid,
  1770.     unsigned long            faceIndex,
  1771.     TQ3AttributeSet            facetAttributeSet);
  1772.  
  1773. #ifdef __cplusplus
  1774. }
  1775. #endif    /* __cplusplus */
  1776.  
  1777. #endif  /* QD3DGeometry_h  */
  1778.